package com.wushijia.model;

import java.util.Optional;
import lombok.Getter;
import lombok.Setter;

/**
 * description:用户表
 *
 * @author yang
 * @date 2018/2/21 11:45
 */
public class User {

  @Setter
  @Getter
  private String id;

  @Setter
  @Getter
  private int age;

  @Setter
  @Getter
  private String name;

  @Getter
  @Setter
  private String sex;

  @Setter
  private Optional<Phone> phone;

  public Optional<Phone> getPhone() {
    return phone;
  }

  public User(int age) {
    this.age = age;
  }

  public User(String name, int age) {
    this.name = name;
    this.age = age;
  }

  public User() {
  }

  public User(String name, String sex, int age) {
    this.name = name;
    this.sex = sex;
    this.age = age;
  }

  public User(String name, String sex, int age, Optional<Phone> phone) {
    this.name = name;
    this.sex = sex;
    this.age = age;
    this.phone = phone;
  }
}
